<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<base href="<%=basePath%>">



<html>
<head>
    <title>Title</title>
</head>
<body>

<div style="border: 1px solid black; width: 620px;height: 600px; text-align: center; padding-top: 110px;page-break-after:always;">
    <p style="font-size: 40px">体</p>
    <p style="font-size: 40px">检</p>

    <p style="font-size: 40px">报</p>
    <p style="font-size: 40px">告</p>
</div>




<c:set var="a" value="1"></c:set>
<c:set var="zhi" value="1"/>
<c:forEach var="p" items="${ExaminationprojectListo}">
    <c:if test="${p.examinationprojectProjectName!=zhi}">
<table border="" cellpadding="0" cellspacing="1"
       class="fkbody-rows" style="page-break-after:always;margin-top: 10px;width: 620px;height: 600px">
    <div style="margin-top: 50px">


        <div class="kf-fl">

            <ul>
                <li STYLE="font-size: 15px;">
                    一维码:<SPAN>${ExaminationprojectListo.get(0).sheet.sheetDimensioncode}</SPAN></li>

            </ul>

        </div>
        <div class="kf-fl">
            <ul>
                <li STYLE="font-size: 15px;margin-left: 370px;margin-top: -35px; ">日期:<span id="shijian"></span></li>

            </ul>

        </div>
    </div>
        <form action="sheet/printSummary?summaryid=${ExaminationprojectList.get(0).medicalSheetId}"
              id="printo"
              method="post">

            <tr class="fkbody-s" _rowindex="0">

                <td class="bodyrow-list" _columnindex="0" style="width: 25%">
                    <div class="bodytxt"
                         style="overflow: hidden; text-align: center;">
                        姓名

                    </div>

                </td>

                <td class="bodyrow-list" _columnindex="1" style="width: 25%">
                    <div class="bodytxt" id="ming${a}"
                         style="overflow: hidden; text-align: center;">${p.sheet.sheetName}</div>
                </td>

                <td class="bodyrow-list" _columnindex="2">
                    <div class="bodytxt"
                         style="overflow: hidden; text-align: center;">性别
                    </div>
                </td>


                <td class="bodyrow-list" _columnindex="4" style="width: 25%">
                    <div class="bodytxt"
                         style="overflow: hidden; text-align: center;">${p.sheet.sheetSex}</div>
                </td>


            </tr>

            <tr class="fkbody-s" _rowindex="0">
                <td class="bodyrow-list" _columnindex="2" style="width: 25%">
                    <div class="bodytxt"
                         style="overflow: hidden; text-align: center;height: 30px">
                        科室
                    </div>
                </td>


                <td class="bodyrow-list" _columnindex="4">
                    <div class="bodytxt"
                         style="overflow: hidden; text-align: center;">${p.roomName}</div>
                </td>
                <td class="bodyrow-list" _columnindex="2" style="width: 25%">
                    <div class="bodytxt"
                         style="overflow: hidden; text-align: center;">接收情况
                    </div>
                </td>


                <td class="bodyrow-list" _columnindex="4">
                    <div class="bodytxt"
                         style="overflow: hidden; text-align: center;" id="qingk">
                            ${p.sheet.sheetReceive} </div>
                </td>


            </tr>

            <tr class="fkbody-s" _rowindex="0">
                <td class="bodyrow-list" _columnindex="4" colspan="2">
                    <div class="bodytxt"
                         style="overflow: hidden; text-align: center; height: 30px">
                        检查项目
                    </div>
                </td>
                <td class="bodyrow-list" _columnindex="4" colspan="2">
                    <div class="bodytxt"
                         style="overflow: hidden; text-align: center;height: 30px">
                            ${p.sheet.sheetProject}</div>
                </td>
            </tr>


            <tr class="fkbody-s" _rowindex="0">
                <td class="bodyrow-list" _columnindex="4" colspan="4">
                    <div class="bodytxt"
                         style="overflow: hidden; text-align: center;height: 30px">
                        检查结果
                    </div>
                </td>

            </tr>

            <tr class="fkbody-s" _rowindex="0">
                <td class="bodyrow-list" _columnindex="4">
                    <div class="bodytxt"
                         style="overflow: hidden; text-align: center;">
                        细项名称
                    </div>
                </td>

                <td class="bodyrow-list" _columnindex="4">
                    <div class="bodytxt"
                         style="overflow: hidden; text-align: center;">
                        结果
                    </div>
                </td>
                <td class="bodyrow-list" _columnindex="4">
                    <div class="bodytxt"
                         style="overflow: hidden; text-align: center;">
                        单位
                    </div>
                </td>
                <td class="bodyrow-list" _columnindex="4">
                    <div class="bodytxt"
                         style="overflow: hidden; text-align: center;">
                        参考值
                    </div>
                </td>

            </tr>


            <c:forEach var="ExaminationprojectListo" items="${ExaminationprojectListo}">
                <c:if test="${ExaminationprojectListo.sheet.sheetProject==p.sheet.sheetProject}">
                    <tr class="fkbody-s" _rowindex="0">
                        <td class="bodyrow-list" _columnindex="4">
                            <div class="bodytxt"
                                 style="overflow: hidden; text-align: center;">
                                    ${ExaminationprojectListo.examinationprojectSmallproject}
                            </div>
                        </td>

                        <td class="bodyrow-list" _columnindex="4">
                            <div class="bodytxt"
                                 style="overflow: hidden; text-align: center;">
                                    ${ExaminationprojectListo.examinationprojectResults}
                            </div>
                        </td>
                        <td class="bodyrow-list" _columnindex="4">
                            <div class="bodytxt"
                                 style="overflow: hidden; text-align: center;">
                                    ${ExaminationprojectListo.examinationprojectUnit}
                            </div>
                        </td>
                        <td class="bodyrow-list" _columnindex="4">
                            <div class="bodytxt"
                                 style="overflow: hidden; text-align: center;">
                                    ${ExaminationprojectListo.examinationprojectReference}
                            </div>
                        </td>

                    </tr>
                </c:if>
            </c:forEach>

            <tr class="fkbody-s" _rowindex="0">
                <td class="bodyrow-list" _columnindex="4" colspan="4">
                    <div class="bodytxt"
                         style="overflow: hidden; text-align: center;height: 30px">
                        医生建议
                    </div>
                </td>

            </tr>
            <tr class="fkbody-s" _rowindex="0">
                <td class="" _columnindex="4" colspan="4">

                                                            <textarea id="TextArea1" cols="" rows="" name="summary"

                                                                      style="height: 300px;width: 100%"/>
                        <c:forEach var="hei" items="${sheetListw}">


                            <c:if test="${hei.sheetProject==p.sheet.sheetProject}">

                                ${hei.medical.medicalText}
                            </c:if>
                        </c:forEach>
                    </textarea>
                </td>
            </tr>

        </form>
        <c:set var="a" value="${a+1}"></c:set>
        <c:set var="zhi" value="${p.examinationprojectProjectName}"/>
    </c:if>
</c:forEach>

    </table>
</body>
<script src="js\jquery.min.js"></script>
<script>

    window.print();
    // window.location.href="doShow/allPrintShow";

    var date = new Date();
    var month = date.getMonth() + 1;
    var strDate = date.getDate();
    if (month >= 1 && month <= 9) {
        month = "0" + month;
    }
    if (strDate >= 0 && strDate <= 9) {
        strDate = "0" + strDate;
    }
    var currentDate = date.getFullYear() + "-" + month + "-" + strDate
        + " " + date.getHours() + ":" + date.getMinutes();

    $("#shijian").html(currentDate)
</script>
</html>
